import { get, post } from '@/utils/request';

export const contractApi = (params: any = {}) => get(`/hdapi/gate/contract`, params); // 合约详情
export const loginApi = (params = {}) => post('/hdapi/auth/loginAdmin', params); // 登录
export const orderListApi = (params = {}) => get(`/hdapi/order/htOrderList`, params); // 订单(委托)列表
export const historyOrderApi = (params = {}) => get(`/hdapi/order/historyOrder`, params); // 历史订单-旧
export const myHistoryOrderApi = (params = {}) => get(`/hdapi/order/myHistoryOrder`, params); // 历史订单新
export const delWeiTuosApi = (params = {}) => get(`/hdapi/order/delWeiTuos`, params); // 删除所有历史委托
export const tongBuWeituoApi = (params = {}) => get(`/hdapi/order/tongBuWeituo`, params); // 同步芝麻的历史委托
export const tongBuChengJiaoApi = (params = {}) => get(`/hdapi/order/tongBuChengJiao`, params); // 定时同步芝麻的成交记录
export const tradeListApi = (params = {}) => get(`/hdapi/order/myTrades`, params); // 成交记录
export const tradeListNewApi = (params = {}) => get(`/hdapi/order/myTradesNew`, params); // 成交记录新
export const delChengJiaosApi = (params = {}) => get(`/hdapi/order/delChengJiaos`, params); // 删除所有成交记录
export const zhimaListApi = (params = {}) => get('/hdapi/zhima', params); // 芝麻列表
export const addZhimaApi = (params = {}) => post('/hdapi/zhima', params); // add芝麻
export const editZhimaApi = (params = {}) => post('/hdapi/zhima/edit', params); // 修改芝麻
export const userListApi = (params = {}) => get('/hdapi/user/list', params); // 员工列表
export const AddUserApi = (params = {}) => post('/hdapi/user/add', params); // 新增、修改员工
export const eidtPasswrodApi = (params = {}) => post('/hdapi/user/eidtPasswrod', params); // 修改密码
export const rechargeApi = (params = {}) => post('/hdapi/recharge/add', params); // 充值
export const rechargeListApi = (params = {}) => get('/hdapi/recharge/list', params); // 充值列表
export const submitOrderApi = (params = {}) => post(`/hdapi/order/submitOrder`, params); // 下单
export const setLeverageApi = (params = {}) => post(`/hdapi/positions/setLeverage`, params); // 设置杠杆
export const contractAccount = (params = {}) => get(`/hdapi/user/futuresAccount`, params); // 合约账号
export const positionsApi = (params = {}) => get(`/hdapi/positions/htPositions`, params); // 仓位列表
export const historyPositionApi = (params = {}) => get(`/hdapi/positions/htLSPositions`, params); // 历史仓位
export const myHistoryPositionApi = (params = {}) =>
  get(`/hdapi/positions/myHistoryPosition`, params); // 历史仓位-我的
export const delOrderApi = (params = {}) => get(`/hdapi/order/delOrder`, params); // 撤销
export const fundFlowApi = (params = {}) => get(`/hdapi/user/htfundFlow`, params); // 资金流水
export const zhiYingSunApi = (params = {}) => post(`/hdapi/positions/zhiYingSun`, params); // 止盈止损
export const getZhiYingSunApi = (params = {}) => get(`/hdapi/positions/getZhiYingSun`, params); // 止盈止损列表
export const delZhiYingApi = (params = {}) => get(`/hdapi/positions/deleteZhiYingSun`, params); // 删除止盈
// 定时同步芝麻历史仓位
export const tongBuPositionsApi = (params = {}) =>
  get(`/hdapi/positions/tongBuHistoryPositions`, params);
export const tongBuCWListApi = (params = {}) => get(`/hdapi/tongBuPosition/list`, params); // 同步记录列表
export const deleteAllTongBuApi = (params = {}) => get(`/hdapi/tongBuPosition/deleteAll`, params); // 删除所有同步记录
// 删除所有历史仓位
export const delAllLiShiPositionApi = (params = {}) =>
  get(`/hdapi/positions/delAllLiShiPosition`, params);
// 重置同步信息: 删除所有的记录,历史仓位,用户同步记录 @Get('resetSyncData')
export const resetSyncDataApi = (params = {}) => get(`/hdapi/positions/resetSyncData`, params);
export const autoBaoCangApi = (params = {}) => get(`/hdapi/positions/autoBaoCang`, params); // 自动爆仓
export const yiJianPingCangApi = (params = {}) => get(`/hdapi/positions/yiJianPingCang`, params); // 一键平仓
// 删除指定时间段的历史仓位
export const delLiShiPositionApi = (params = {}) =>
  get(`/hdapi/positions/delLiShiPosition`, params);
// 重置用户总盈亏
export const resetUserYingKuiApi = (params = {}) =>
  get(`/hdapi/positions/resetUserYingKui`, params);
